package io.github.wslxm.springbootplus2.core.base.desensitization.handler;


import cn.hutool.core.util.DesensitizedUtil;
import io.github.wslxm.springbootplus2.core.base.desensitization.DesensitizationHandler;

/**
 * 【身份证号】前1位 和后2位
 *
 * @author wangsong
 * @date 2023/09/05
 */
public class IdCardNumDesensitizationHandler implements DesensitizationHandler {

    @Override
    public String handler(String str) {
        // 身份证 5***************1X
        return DesensitizedUtil.idCardNum(str, 1, 2);
    }
}
